package model;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.Socket;

public class Client {
	
	/**
	 * Client properties
	 */
	private String name;
	private Socket socket;
	private ObjectInputStream inStream;
	private ObjectOutputStream outStream;
	
	/**
	 * Constructor for the client object
	 * 
	 * 
	 * @param clientSocket The socket of this client
	 */
	public Client(Socket clientSocket ){
		
		this.name = name;
		socket = clientSocket;
		
		
		try {
			inStream = new ObjectInputStream(socket.getInputStream());
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		try {
			outStream = new ObjectOutputStream(socket.getOutputStream());
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	public String getName(){
		return name;
	}
	
	public Socket getSocket(){
		return socket;
	}

	public void setSocket(Socket socket) {
		this.socket = socket;
	}

	/**
	 * @return the inStream
	 */
	public ObjectInputStream getInStream() {
		return inStream;
	}

	/**
	 * @return the outStream
	 */
	public ObjectOutputStream getOutStream() {
		return outStream;
	}

	/**
	 * @param inStream the inStream to set
	 */
	public void setInStream(ObjectInputStream inStream) {
		this.inStream = inStream;
	}

	/**
	 * @param outStream the outStream to set
	 */
	public void setOutStream(ObjectOutputStream outStream) {
		this.outStream = outStream;
	}

	public void setName(String name2) {
		this.name = name2;
	}
	
	

	
	
}
